<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
</head>
<body>
<form action="uplogin.php" method="post" enctype="multipart/form-data">
    <img src="" id="showImg" style="width: 50px;height: 50px">
    <br />
    <input type="file"  name="file" id="file" multiple="multiple"  >
    <br />

    姓名<br />
    <input type="text" name="usename" id="" value="" />
    <br />特长<br />
    <select name="speciality">
        <option value="java">java</option>
        <option value="c#">c#</option>
        <option value="javaScipt">javaScipt</option>
        <option value="c++">c++</option>
        <option value="css">css</option>
    </select>
    <br />性别<br />
    <input type="radio" name="sex" id="" value="男" />男
    <input type="radio" name="sex" id="" value="女" />女
    <br />公司<br />
    <input type="text" name="company" id="" value="" />
    <input type="checkbox" name="" id="" value="" />在个人主页展示
    <br />职务<br />
    <input type="text" name="position" id="" value="" />
    <input type="checkbox" name="" id="" value="" />在个人主页展示
    <br />所在地<br />
    <select name="address">
        <option value="">   </option>
        <option value="北京市">北京市</option>
        <option value="上海市">上海市</option>
        <option value="福建省">福建省</option>
        <option value="广东省">广东省</option>
        <option value="浙江省">浙江省</option>
    </select>
    <select name="city">
        <option value="">   </option>
        <option value="海淀区">海淀区</option>
        <option value="朝阳区">朝阳区</option>
        <option value="浦东">浦东</option>
        <option value="福州市">福州市</option>
        <option value="广州市">广州市</option>
    </select>
    <br />自我介绍<br />
    <textarea rows="5" cols="20" name="oneself">

			</textarea>
    <br /><input type="submit" name="" id="" value="提交" /><br />
</form>
</body>
<script type="text/javascript">
    var fileObj = document.getElementById('file');
    function showImg() {

        var files = fileObj['files'];
        var URL = window.URL || window.webkitURL;
        var imgURL = URL.createObjectURL(files[0]);
        document.getElementById('showImg').src = imgURL;
    }
    onload = function(){
        console.log(fileObj)
        fileObj.onchange = showImg;
    }
</script>
</html>
